package com.tongtong.utils;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@Slf4j
public class TtException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private Integer code = 400;

    public TtException() {}

    public TtException(String message) {
        super(message);
    }

    public TtException(Integer code,String message) {
        super(message);
        this.code = code;
    }
    public TtException(String message, Throwable cause) {
        super(message, cause);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}